home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
FSEEK.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
2KB
|
70 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_FSeek( xValue, cUDFFound, cUDFNFound ) -->lFound
PARAMETERS:
xValue : A value of any type to be SEEKed
SHORT:
SEEK without moving record pointer if value not found.
DESCRIPTION:
_FSeek() is functionally similar to Clippers SEEK command, but differs in
that _FSeek() does not move the record pointer if the record is not found.
If the record pointer is found, the record pointer is moved to the new
record.
Additionally, two optional parameters may be passed containing the names
of functions to be executed if the seek succeeds or fails. cUDFFound, as
the name implies, if linked into the program, is executed if the SEEK value
is found. The same is true for the cUDFNFound parameter.
If either of the UDFs specified are not present at run time, nothing
happens, and the function returns the FOUND() value of the SEEK.
NOTE:
The record pointer is returned to the original record BEFORE the cUDFNFound
UDF is called!
If either of the UDFs specified are not present at run time, nothing happens,
and the function returns the FOUND() (TRUE or FALSE) value of the SEEK.
EXAMPLE:
GOTO nRec
? recno() // 14583
SEEK cNoFind
? found() // .f.
? eof() // .t.
? recno() // (last record+1)
GOTO nRec
? recno() // 14583
_FSeek(cNoFind)
? found() // .f.
? eof() // .f.
? recno() // 14583
_FSeek(nVal,"WhatToDoIfFound('Yep')","WhatToDoIfNOTFound('Nope')")
Result: nVal is SEEKed on the current index. If FOUND(), then
WhatToDoIfFound('Yep') is called (if present), else the record pointer is
returned to the original record and WhatToDoIfNOTFound('Nope') is called (if
present).
******************************************************************************/